<template>
	<view class="bot" :style="{ height: this.app_height * 2 + 'rpx' }">
		<view class="bot1" @click="sz(1)">
			<view>
				用户协议
			</view>
			<view>
				<u-icon name="arrow-right"></u-icon>
			</view>
		</view>
		<view class="bot1" @click="sz(2)">
			<view>
				隐私策略
			</view>
			<view>
				<u-icon name="arrow-right"></u-icon>
			</view>
		</view>
		<view class="bot1" @click="sz(3)">
			<view>
				关于
			</view>
			<view>
				<u-icon name="arrow-right"></u-icon>
			</view>
		</view>
		<view class="bot1" @click="sz(4)">
			<view>
				修改密码
			</view>
			<view>
				<u-icon name="arrow-right"></u-icon>
			</view>
		</view>
		<view class="bot2" @click="tc()">
			退出登录
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				app_height: 0
			};
		},
		onLoad() {
			const _this = this;
			uni.getSystemInfo({
				success: res => {
					console.log('手机可用高度:' + res.windowHeight * 2 + 'rpx');
					_this.app_height = res.windowHeight * 2;
				}
			});
		},
		methods:{
			tc(){
				uni.showModal({
				    title: '提示',
				    content: '是否退出登录！',
					cancelColor: '#fe5353',
					confirmColor:'#008a00', 
				    success: function (res) {
				        if (res.confirm) {
				            console.log('用户点击确定');
							uni.removeStorage({
								key: 'token',
							})
							uni.reLaunch({
								url: '../login/login'
							})
							return;
				        } else if (res.cancel) {
				            console.log('用户点击取消');
							return;
				        }
				    }
				});
			},
			sz(to) {
				uni.navigateTo({
					url: 'sz/sz'+to
				})
				if(to == 4){
					uni.navigateTo({
						url:'sz/xgmm'
					})
				}
			}
		}
	}
</script>

<style lang="scss">
	.bot {
		width: 100%;
		height: 100%;
		background-color: #3b3b43;
		
		.bot1 {
			display: flex;
			color: #ffffff;
			font-size: 38rpx;
			width: 90%;
			margin-left: 4%;
			padding-top: 20rpx;
			padding-bottom: 20rpx;
			justify-content: space-between;
		}
		
		.bot2 {
			width: 80%;
			height: 100rpx;
			line-height: 100rpx;
			text-align: center;
			margin-left: 10%;
			background: #FFA800;
			color: #3b3b43;
			border-radius: 60rpx;
			margin-top: 60rpx;
		}
		
	}
</style>
